#include <iostream>
using namespace std;

double getAverage(int *arr, int size);

int main()
{
    int arr[5] = {100, 2, 3, 9, 9};
    double kk;
    kk = getAverage(arr, 5);
    cout << "Average value is : " << kk << endl;
    return 0;
}

// double getAverage(int *arr, int size)
// {
//     cout << arr[0] << endl;
//     cout << arr << endl;

//     return 0.1;
// }

double getAverage(int *arr, int size)
{
    int i,sum = 0;
    double avg;
    cout << "arr is " << arr <<endl;
    cout << "*arr is " << *arr <<endl;
    cout << "arr0 is " << arr[0] <<endl;
    for (i=0; i<size; ++i)
    {
        sum += arr[i];
    }
    avg = double(sum) / size;
    return avg;
}